<!--
 * @Description  : 分页
 * @Author       : zhao
 * @Date         : 2022-07-11 14:38:25
 * @LastEditors  : zhao
 * @LastEditTime : 2022-07-27 10:12:24
-->
<template>
	<div class="panination">
		<el-pagination v-model:currentPage="useTableInfos.searchData.pageIndex"
			v-model:page-size="useTableInfos.searchData.pageSize" :page-sizes="[10, 20, 50, 100]"
			layout="total, sizes, prev, pager, next, jumper" :total="zpagination.total" @size-change="handleSizeChange"
			@current-change="handleCurrentChange" />
	</div>
</template>

<script setup lang='ts'>
import { ref } from 'vue';
import { useTableInfo } from '/@/stores/ztable'
const useTableInfos = <any>useTableInfo()
const { zpagination, getTableData, searchData } = useTableInfo()

const handleCurrentChange = () => {
	getTableData()
}
const handleSizeChange = () => { getTableData() }
</script>
<style lang='scss' scoped>
.panination {
	float: right;
}
</style>